<template>
    <div class="appFrame">
        <appTop :topTitle="appTitle" icon='icon_Nav_saoyisao' iconTip='扫一扫' @scan='scan'> </appTop>
        <div class="content">
            <slot></slot>
        </div>

        <appBottom @bottomSelect='bottomSelect'></appBottom>
    </div>
</template>

<script>
const appTop = () => import('./top.vue')
const appBottom = () => import('./bottom.vue')
export default {
    props: {
        showBottom: {
            type: Boolean,
            default: true
        }
    },
    components: { appTop, appBottom },
    data () {
        return {
            appTitle: '系统首页',
        }
    },
    methods: {
        bottomSelect (index, item) {
            if (index != 2) {
                this.appTitle = item.title
            }
            console.log(index)
        },
        scan () {
            console.log('扫一扫');
        },
    }
}
</script>

<style>
.appFrame {
    width: 100%;
    height: 100%;
}

.content {
    width: 100%;
    height: 100%;
    background-color: #181c29;
    padding: 0px 16px;
    padding-bottom: 120px;
}
</style>